import request from '@/utils/request'

// 查询角色列表
export function roleList(query) {
  return request({
    url: '/api/v1/admin/permission/role/list',
    method: 'get',
    params: query
  })
}

// 查询角色列表
export function roleListAll() {
  return request({
    url: '/api/v1/admin/permission/role/listAll',
    method: 'get'
  })
}

// 新增角色
export function roleAdd(data) {
  return request({
    url: '/api/v1/admin/permission/role/add',
    method: 'post',
    data: data
  })
}

// 编辑角色
export function roleEdit(data) {
  return request({
    url: '/api/v1/admin/permission/role/edit',
    method: 'post',
    data: data
  })
}

// 删除角色
export function roleRemove(id) {
  return request({
    url: '/api/v1/admin/permission/role/remove',
    method: 'delete',
    data: id
  })
}